<div id="view-content">
<?php include_once '/../supMenu.html';?>
	<br>
	<h2 class="backend-h2"><span class="img"></span>
		<span> Phân môn học cho giáo viên</span>
    </h2>

    <p class="saporator"><br /></p>

    <div id="accordion">
    	<h3><a href="#">Section 1</a></h3>
    	<div>
    		<!--  Hien thi danh sach giao vien -->
        	<div class="list-teach">
                <h3 class="tmc-title"><a href="#">Danh sách giáo viên</a></h3>
                <form action="" method="post">
                    <input type="hidden" name="teach" />
                    
                    <table>
                        <thead>
                        	<tr>
                        		<th class="col1-teach"><input  type="checkbox" ></th>
                        		<th class="col2-teach">Tên đăng nhập</th>
                        		<th class="col3-teach">Họ và tên</th>
                        	</tr>    			
                        </thead>
                    
                        <tbody>
                        <?php foreach ($this->paginatorTeach as $teach) {
                        	
                        ?>
                        	<tr>
                        		<td class="col1-teach"><input type="checkbox" name="tmc-teach" value="<?php echo $teach['username'];?>"></td>
                        		<td class="col2-teach"><?php echo $teach['username'];?></td>
                                <td class="col3-teach"><?php echo $teach['hoDem']. " ". $teach['ten'];?></td>
                        	</tr>
                        <?php 
                        }
                        ?>
                        </tbody>
                	</table>
                    <br />
                    <input type="submit" name="cmdTAdd" value="Xem"/>
                    	
            	</form>
            	<br>
            	<?php echo $this->paginationControl($this->paginatorTeach,'sliding','paginator.phtml');?>
            	
        	</div><!--  End Hien thi danh sach giao vien -->
                        
            <div class="list-teachmanager-course">
                <!--  Hien thi danh sach lớp học -->
            	<div class="list-course">
                    <h3 class="tmc-title"><a href="#">Danh sách lớp học</a></h3>
                    <form action="" method="post">
                        <input type="hidden" name="tmc-lop"  />
                        
                    	<table>
                        	<thead>
                        		<tr>
                        	        <th class="col1-lop"><input type="checkbox" class="check-all" ></th>
                        	        <th class="col2-lop">Mã lớp </th>
                        	        <th class="col3-lop">Tên lớp </th>
                        			<th class="col4-lop">Khóa</th>
                        		</tr>    			
                        	</thead>
                                
                        	<tbody>
                        	<?php foreach ($this->paginatorLop as $lop) {
                        		
                        	?>
                        		<tr>
                        			<td class="col1-lop"><input class="sub-check"  type="checkbox" name="course-check[]" value="<?php echo $lop['id'];?>" /></td>
                                    <td class="col2-lop"><?php echo $lop['id'];?></td>
                        			<td class="col3-lop"><?php echo $lop['tenLop'];?></td>
                                    <td class="col4-lop"><?php echo $lop['khoa']; ?></td>
                        		</tr>
                        	<?php 
                        	}
                        	?>
                        	</tbody>
                        </table>	
                        <br />
                        
                        <input type="submit" name="cmdLAdd" value=">>" />            
                    </form>
                </div><!--  End Hien thi danh sach lớp học-->
                    
                	
                <div class="list-manger">
                   <h3 class="tmc-title"><a href="#">Danh sách môn học</a></h3>
        			<form action="" method="post">
                        <input type="hidden" name="tmc-manager" />
                          
                        <table>
                            <thead>
                                <tr>
                                    <th class="col1-mon"><input type="checkbox"></th>
                                    <th class="col2-mon">Mã môn học</th>
                                    <th class="col3-mon">Tên môn học</th>
                                </tr>
                            </thead>  
                            
                            <tbody>
                            <?php 
                            if (isset($this->paginatorMon)){
                            	foreach ($this->paginatorMon as $mon) {
                            ?>
                            	<tr>
                            		<th class="col1-mon"><input type="checkbox" name="tmc-mon[]" value="<?php echo $mon['id'];?>"></th>
        	                        <th class="col2-mon"><?php echo $mon['id'];?></th>
        	                        <th class="col3-mon"><?php echo $mon['tenMonHoc'];?></th>
                                </tr>
                            <?php 
                            	}
                            }
                            ?>
                            </tbody>
                        </table>
        			</form>                   	
                </div>            	
        	</div>	
    	</div>
    	
        <h3><a href="#">Các lớp mà <b>
            	<i><?php if (isset($this->teachManager)) echo $this->teachManager['hoDem']." ".$this->teachManager['ten'];?></i>
            	</b>đang quản lý
            </a>
        </h3>
    	<div>
    	   
            <form action="" method="post">
                <input type="hidden" name="tmc-manager" />
                  
                <table>
                    <thead>
                        <tr>
                            <th>Mã lớp</th>
                            <th>Tên lớp</th>
                            <th>Xóa</th>
                        </tr>
                    </thead>  
                    
                    <tbody>
                    <?php 
                    if (isset($this->paginatorMangager)){
                    	foreach ($this->paginatorMangager as $manager) {
                    ?>
                    	<tr>
                            <th><?php echo $manager['idLop'];?></th>
                            <th><?php echo $manager['tenLop'];?></th>
                            <th><a href="<?php echo $this->baseUrl('/admin/tmc/?')?>">Xóa</a></th>
                        </tr>
                    <?php 
                    	}
                    }
                    ?>
                    </tbody>
                </table>
            </form>   
    	</div>
    	
    </div>    
</div>

<script>
	$(function() {
		$( "#accordion" ).accordion();
	});
</script>

